from rest_framework import serializers
from .models import PromptTemplate


class PromptTemplateSerializer(serializers.ModelSerializer):
    """提示词模版序列化器"""

    class Meta:
        model = PromptTemplate
        fields = [
            "id",
            "name",
            "pre_prompt",
            "user_input_form",
            "description",
            "create_at",
            "update_at",
        ]
        read_only_fields = ["id", "create_at", "update_at"]
